package com.xxx.service.impl;

import java.util.List;

import com.xxx.bean.Course;
import com.xxx.bean.Student;
import com.xxx.dao.StudentDAO;
import com.xxx.service.StudentService;

public class StudentServiceImpl implements StudentService {
	
	private StudentDAO studentDao;

	public StudentDAO getStudentDao() {
		return studentDao;
	}

	public void setStudentDao(StudentDAO studentDao) {
		this.studentDao = studentDao;
	}

	public void delete(Student student) throws Exception {
		studentDao.delete(student);

	}

	public List<Student> findAll() throws Exception {
		
		return studentDao.findAll();
	}

	public void save(Student student) throws Exception {
		studentDao.save(student);

	}

	public void update(Student student) throws Exception {
		studentDao.update(student);

	}

	public Student findById(int id) throws Exception {
		
		return studentDao.findById(id);
	}

	public Student findBySno(int sno) throws Exception {
		// TODO Auto-generated method stub
		return studentDao.findBySno(sno);
	}

	public void delScr(Student s, Course c) throws Exception {
		
		   studentDao.delScr(s, c);
		
	}

}
